package org.example.wikwok.common;

public interface ReturnedMessage {
    public static final String TOKENINVALID = "Token is invalid";
    public static final String FILEISNULL = "File is null";
    public static final String USERNAMEISNULL = "Username is null";
    public static final String USERREGISTEREDSUCCESS = "User registered successfully";
    public static final String USERREGISTEREDFAILED = "User register failed";
    public static final String USERREGISTEREDFAILED_NAMEEXIST = "User register failed :Username is already exist";
    public static final String USERLOGINSUCCESS = "User login successful";
    public static final String USERLOGINFAILED = "User login failed";
    public static final String USERINFOSUCCESS = "User information retrieved successfully";
    public static final String USERINFOFAILED = "User information retrieval failed";
    public static final String USERLOGOUTSUCCESS = "User logout successful";
    public static final String USERLOGOUTFAILED = "User logout failed";
    public static final String USERFOLLOWSUCCESS = "User followed successfully";
    public static final String USERFOLLOWFAILED = "User followed failed";
    public static final String USERUNFOLLOWSUCCESS = "User unfollowed successfully";
    public static final String USERUNFOLLOWFAILED = "User unfollow failed";
    public static final String USERUPDATEDPASSWORDSUCCESS = "User password updated successfully";
    public static final String USERUPDATEPASSWORDFAILED = "User password update failed";
    public static final String USERUPDATEPASSWORDFAILED_PASSWORDINCORRECT = "User password update failed:User oldPassword is incorrect";
    public static final String USERUPDATEDINFOSUCCESS= "User information updated successfully";
    public static final String USERUPDATEINFOFAILED = "User information update failed";
    public static final String VIDEOUPLOADEDSUCCESS = "Video uploaded successfully";
    public static final String VIDEOUPLOADFAILED = "Video upload failed";
    public static final String VIDEOUPLOADFAILED_TITLEEXIST = "Video upload failed: title already exists";
    public static final String VIDEODELETEDSUCCESS = "Video deleted successfully";
    public static final String VIDEODELETEDFAILED = "Video delete failed";
    public static final String VIDEODELETEDFAILED_NOAUTH = "Video delete failed: user not authorized";
    public static final String VIDEOCOLLECTEDSUCCESS = "Video collected successfully";
    public static final String VIDEOCOLLECTEDFAILED = "Video collect failed";
    public static final String VIDEOUNCOLLECTEDSUCCESS = "Video uncollected successfully";
    public static final String VIDEOUNCOLLECTEDFAILED = "Video uncollect failed";
    public static final String VIDEOLIKESUCCESS = "Video liked successfully";
    public static final String VIDEOLIKEFAILED = "Video like failed";
    public static final String VIDEOUNLIKESUCCESS = "Video unliked successfully";
    public static final String VIDEOUNLIKEFAILED = "Video unlike failed";
    public static final String VIDEOLISTSUCCESS = "Video list retrieved successfully";
    public static final String VIDEOLISTFAILED = "Video list retrieval failed";

    public static final String VIDEOLISTSUCCESS_LESS ="videos list retrieved successfully but there are not enough videos to show";
    public static final String VIDEOLISTFAILED_NOVIDEOS = "Video list retrieval failed: the offset is too large or there are no videos to show";
    public static final String COMMENTLISTSUCCESS = "Comment list retrieved successfully";
    public static final String COMMENTLISTFAILED = "Comment list retrieval failed";
    public static final String SECENDCOMMENTLISTSUCCESS= "Secondary comment list retrieved successfully";
    public static final String SECENDCOMMENTLISTFAILED = "Secondary comment list retrieval failed";
    public static final String COMMENTSUCCESS = "Comment added successfully";
    public static final String COMMENTFAILED = "Comment add failed";
    public static final String COMMENTDELETESUCCESS = "Comment deleted successfully";
    public static final String COMMENTDELETEFAILED = "Comment delete failed";
    public static final String SECENDCOMMENTSUCCESS= "Second comment added successfully";
    public static final String SECENDCOMMENTFAILED = "Second comment add failed";
    public static final String SECENDCOMMENTDELETESUCCESS = "Second comment deleted successfully";
    public static final String SECENDCOMMENTDELETEFAILED = "Second comment delete failed";
    public static final String SEARCHEDSUCCESS = "Search results retrieved successfully";
    public static final String SEARCHEDFAILED = "Search results retrieval failed";





    public static String getMessages(int code){
        switch (code) {
            case 8888:
                return TOKENINVALID;
            case 7777:
                return USERNAMEISNULL;
            case 6666:
                return FILEISNULL;
            case 1101:
                return USERREGISTEREDSUCCESS;
            case 1102:
                return USERREGISTEREDFAILED;
            case 1103:
                return USERREGISTEREDFAILED_NAMEEXIST;
            case 1111:
                return USERLOGINSUCCESS;
            case 1112:
                return USERLOGINFAILED;
            case 1113:
                return USERINFOSUCCESS;
            case 1114:
                return USERINFOFAILED;
            case 1121:
                return USERLOGOUTSUCCESS;
            case 1122:
                return USERLOGOUTFAILED;
            case 1201:
                return USERFOLLOWSUCCESS;
            case 1202:
                return USERFOLLOWFAILED;
            case 1211:
                return USERUNFOLLOWSUCCESS;
            case 1212:
                return USERUNFOLLOWFAILED;
            case 1301:
                return USERUPDATEDPASSWORDSUCCESS;
            case 1302:
                return USERUPDATEPASSWORDFAILED;
            case 1303:
                return USERUPDATEPASSWORDFAILED_PASSWORDINCORRECT;
            case 1401:
                return USERUPDATEDINFOSUCCESS;
            case 1402:
                return USERUPDATEINFOFAILED;
            case 2101:
                return VIDEOUPLOADEDSUCCESS;
            case 2102:
                return VIDEOUPLOADFAILED;
            case 2103:
                return VIDEOUPLOADFAILED_TITLEEXIST;
            case 2111:
                return VIDEODELETEDSUCCESS;
            case 2112:
                return VIDEODELETEDFAILED;
            case 2113:
                return VIDEODELETEDFAILED_NOAUTH;
            case 2201:
                return VIDEOCOLLECTEDSUCCESS;
            case 2202:
                return VIDEOCOLLECTEDFAILED;
            case 2211:
                return VIDEOUNCOLLECTEDSUCCESS;
            case 2212:
                return VIDEOUNCOLLECTEDFAILED;
            case 2301:
                return VIDEOLIKESUCCESS;
            case 2302:
                return VIDEOLIKEFAILED;
            case 2311:
                return VIDEOUNLIKESUCCESS;
            case 2312:
                return VIDEOUNLIKEFAILED;
            case 2401:
                return VIDEOLISTSUCCESS;
            case 2402:
                return VIDEOLISTFAILED;
            case 2403:
                return VIDEOLISTSUCCESS_LESS;
            case 2404:
                return VIDEOLISTFAILED_NOVIDEOS;
            case 3101:
                return COMMENTLISTSUCCESS;
            case 3102:
                return COMMENTLISTFAILED;
            case 3201:
                return COMMENTSUCCESS;
            case 3202:
                return COMMENTFAILED;
            case 3211:
                return COMMENTDELETESUCCESS;
            case 3212:
                return COMMENTDELETEFAILED;
            case 3301:
                return SECENDCOMMENTSUCCESS;
            case 3302:
                return SECENDCOMMENTFAILED;
            case 3311:
                return SECENDCOMMENTDELETESUCCESS;
            case 3312:
                return SECENDCOMMENTDELETEFAILED;
            case 3401:
                return SECENDCOMMENTLISTSUCCESS;
            case 3402:
                return SECENDCOMMENTLISTFAILED;
            case 4001:
                return SEARCHEDSUCCESS;
            case 4002:
                return SEARCHEDFAILED;
            default:
                return "Invalid code";
        }
    }
}
